<script>
	import { useStore } from 'vuex'
	
	export default {
		onLaunch: function() {
			const store = useStore();
			// console.log('App Launch')
			// uni.getStorage({
			// 	key: "userInformation",
			// 	success: (res) => {
			// 		console.log('xxx',res);
			// 		store.commit({
			// 			type: "login",
			// 			userInfo: res.userInfo,
			// 			token: res.token
			// 		});
			// 	}
			// })
		},
		onShow: function() {
			const store = useStore();
			const cartList = uni.getStorageSync("shoppingList") || [];
			console.log("cartList: ",cartList);
			if (!cartList.length) {
				// store.dispatch("handleGetCartData");
			}
			console.log(cartList);
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* #ifdef H5 */
	body,html{
		overflow-x: hidden;
	}
	body::-webkit-scrollbar {
		display: none;
	}
	/* #endif */
	@import './static/css/iconfont.css';
	@import './static/css/reset.css';
	/*每个页面公共css */
	@import './static/css/free.scss';
</style>
